package FWK.components;

import java.awt.Cursor;
import java.util.Enumeration;

import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;

public class FwkButtonGroup extends ButtonGroup implements FwkComponent {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3368088836256596490L;

	public void activate() {
		Enumeration<AbstractButton> radios = this.getElements();
		while (radios.hasMoreElements()) {
			AbstractButton rd = radios.nextElement();
			rd.setEnabled(true);
			rd.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		}
	}

	public void standBy() {
		Enumeration<AbstractButton> radios = this.getElements();
		while (radios.hasMoreElements()) {
			AbstractButton rd = radios.nextElement();
			rd.setEnabled(false);
			rd.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
		}
	}

}
